using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.Data;
using ProjectBase.Utils;

namespace CMS.Web.Common
{
    public partial class SubVBound : ViewUserControl
    {
        public string ViewId;
        public string Title;
        public string TenHamDong = "";
        public bool IsActive = false;                
        public string LockLink = "";

        protected void Page_Load(object sender, EventArgs e)
        {

            LockLink = this.HomeUrl + "?cid=" + ViewId;
            Int32 _viewId = NHibernateDaoFactory.Instance.GetBaiVietDao().GetCountByTheLoai(CUtilities.IntegerForNull(ViewId));
            if (!_viewId.Equals(-1))
            {
                LockLink += "&vid=" + _viewId.ToString();
            }

            
        }
        public void Init_SubVBound(string ViewId, string TieuDe, bool IsActive)
        {
            this.ViewId = ViewId;
            this.Title = Server.HtmlEncode(TieuDe);
            this.IsActive = IsActive;
        }        
    }
}